#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<string.h>
int main()
{
  //系统接口
  const char *msg1="hello 标准输出\n";
  write(1,msg1,strlen(msg1));
 // const char *msg2="hello 标准错误\n";
 // fprintf(stdout,"hello printf\n");
 // write(2,msg2,strlen(msg2));

  //C语言接口 stdout->FILE * ->FILE struct
  printf("hello printf\n");  
  fprintf(stdout,"hello fprintf\n");
  fputs("hello fputs\n",stdout);
  fflush(stdout);
  fork();
  return 0;


 // //close(1); 
 // int fd=open("./log.txt",O_CREAT|O_WRONLY,0644);
 // printf("%d",fd); 
 // fprintf(stdout,"hello world!\n");
 // fprintf(stdout,"hello world!\n");
 // fprintf(stdout,"hello world!\n");
 // fprintf(stdout,"hello world!\n"); 
 // fprintf(stdout,"hello world!\n");
 // close(fd);
 
 }
